As is known, a microprogrammable device is an electronic device comprising: a processor; a code memory storing a software and/or firmware code comprising a set of instructions to be executed; and a data memory storing values of variables used in executing the code.
When in use, the microprogrammable devices execute the code, i.e. the instructions, stored in the code memory.
More specifically, the microprogrammable devices execute each instruction at a corresponding instruction cycle.
Moreover, the microprogrammable devices, each time they execute an instruction, update a register known as program counter, which stores the address of the code memory at which the next instruction to be executed is stored.
To find and eliminate any errors in, i.e. to debug, the code of a microprogrammable device, the code is traced.
Tracing the code means determining a sequence of instructions executed by the microprogrammable device.
Top-of-the-range microprogrammable devices are known which feature a high-speed code tracing interface comprising a number of pins.
More specifically, by means of the interface, it is possible to communicate the addresses of all the instructions executed.
To trace the code of a top-of-the-range microprogrammable device of this sort, a tracer, i.e. an electronic code tracing device, is connected to the code tracing interface of the microprogrammable device.
The tracer comprises a respective code memory in which the instructions of the code of said microprogrammable device are stored at the same addresses as in the code memory of said microprogrammable device.
Via the tracing interface, the tracer acquires the addresses of the instructions executed by the microprogrammable device, and reconstructs the executed instruction sequence on the basis of the acquired addresses and of the code stored in its own respective code memory, more specifically on the basis of the instructions stored in its own respective code memory at the acquired addresses.
The Applicant, however, has observed that, using current techniques, microprogrammable device code tracing places a heavy load on the hardware resources of the microprogrammable device, especially in terms of the microprogrammable device pins necessary to communicate the executed instruction addresses.
In fact, for example, assuming the microprogrammable device code memory stores a thousand instructions, and each pin transmits a corresponding bit of the executed instruction addresses, the microprogrammable device would need at least ten pins to communicate the executed instruction addresses.
And, if the number of instructions stored is increased, the microprogrammable device may need even more pins to communicate the executed instruction addresses.